package top.zuli.package01.class16;

import org.junit.Test;

import java.time.ZoneId;
import java.util.Set;

public class Demo5 {
    @Test
    public void ZoneIdMethodTest1() {
        //获取所有时区信息
        Set<String> availableZoneIds = ZoneId.getAvailableZoneIds();
        for(String zone: availableZoneIds){
            System.out.println(zone);
        }
        //获得系统默认时区
        ZoneId zoneId = ZoneId.systemDefault();
        System.out.println(zoneId);
    }
}

/*
public class Demo5 {
    @Test
    public void ZoneIdMethodTest1() {
        Set<String> availableZoneIds = ZoneId.getAvailableZoneIds();
        for(String zone: availableZoneIds){
            System.out.println(zone);
        }
        ZoneId zoneId = ZoneId.systemDefault();
        System.out.println(zoneId);
    }
}
*/
